#ifndef PH_SCROLL
#define PH_SCROLL
#include <atlbase.h>
#include <atlapp.h>
#include <atlscrl.h>
#include <atlcrack.h>

class PHScroll: public CScrollWindowImpl<PHScroll>
{
public:
	PHScroll()
	{
	}
	
	DECLARE_WND_CLASS(NULL)
	BEGIN_MSG_MAP(PHScroll)
		MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRB)
		//MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLB)
		 MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
		CHAIN_MSG_MAP(CScrollWindowImpl<PHScroll>);
	END_MSG_MAP()

	void DoPaint(CDCHandle hDC);
	LRESULT OnRB(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/);
	//LRESULT OnLB(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/);
	void SetSize(SIZE);
	void PHLToD(RECT &r);
	void PHDToL(POINT &p);
	LRESULT OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled);

	BOOL PreTranslateMessage(MSG* pMsg)
	{
		pMsg;
		return FALSE;
	}
};

#include <string>

class PHTimeInfo : public CScrollWindowImpl<PHTimeInfo>
{
public:
	PHTimeInfo()
	{
	}
	
	DECLARE_WND_CLASS(NULL)
	BEGIN_MSG_MAP(PHTimeInfo)
		CHAIN_MSG_MAP(CScrollWindowImpl<PHTimeInfo>);
	END_MSG_MAP()

	void DoPaint(CDCHandle dc);
	
	void SetSize(SIZE);
	void DrawTimeAxis(  CDCHandle hDC);
	void DisplayInfo();

	BOOL PreTranslateMessage(MSG* pMsg)
	{
		pMsg;
		return FALSE;
	}
	long _ID;
	HICON _hIcon;
	std::string _ps;
};

std::string PHTotals(unsigned long CRC);

#endif